package ThreadDemo;

public class ThreadDemo09 {
    public static void main(String[] args) throws InterruptedException {
        Thread t=new Thread(){
            @Override
            public void run() {
                for(int i=0;i<10;i++){
                    System.out.println(Thread.currentThread().isInterrupted());
//                    System.out.println(Thread.interrupted());
                }
            }
        };
        t.start();
        t.interrupt();
    }
}
